package com.itheima.loop;

public class LoopNestedDemo7 {
    public static void main(String[] args) {
        //嵌套循环
        int i;
        int j = 0;
        for ( i = 0; i < 5; i++) {
            System.out.println("外层循环");
            for ( ; j < 5;j++) {
                System.out.println("内层循环");

            }
        }
        System.out.println("外层循环一共执行了" + i+"次");
        System.out.println("--  --  ----");

        /*
        ***
        ***
        ***
        */
        for (i = 0; i < 3; i++) {
            for (j = 0; j < 3; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
